public class demo26 {
    public static void main(String[] args) throws InterruptedException {
        Object locker=new Object();
        Thread t1=new Thread(()->{
            synchronized(locker){
                try {
                    locker.wait();
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }
            System.out.println("hello run");
        });
        t1.start();
        Thread.sleep(1000);
        synchronized(locker){
            locker.notify();
        }
//        Thread.sleep(1000);
    }
}
